// /mock/index.js文件(mock的总引用文件)
const Mock = require('mockjs')
const events = require('./apis/events')

const mocks = [
  ...events
]

function mockXHR() {
  for (const i of mocks) {
    Mock.mock(new RegExp(i.url), i.type || 'get', i.response)
  }
}

module.exports = {
  mocks,
  mockXHR
}
